package src.queries;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.Date;

public class QueryFactory {
	protected Connection con;
	
	public QueryFactory(Connection c) {
		this.con = c;
	}

	public PreparedStatement makePreparedStatement(String SQL)
	throws SQLException {
		return con.prepareStatement(SQL);

	}
	
	public static java.sql.Date parseDate(Date d) {
		if (d == null)
			return null;
		return new java.sql.Date(d.getTime());
	}

	public static java.util.Date utilDate(java.sql.Date d){
		if (d == null)
			return null;
		return new java.util.Date(d.getTime());
	}

}
